{% extends 'base.html' %}
{% block head %}
	<link href="{{ path }}css/components/signin.css" rel="stylesheet" type="text/css">   
	<script src="{{ path }}js/demos/signin.js"></script>
    
    <link href="{{ path }}js/plugins/datatables/DT_bootstrap.css" rel="stylesheet">
	<link href="{{ path }}js/plugins/responsive-tables/responsive-tables.css" rel="stylesheet"> 
    
    <script src="{{ path }}js/demos/demo.tables.js"></script>
    <script src="{{ path }}js/plugins/datatables/jquery.dataTables.js"></script>
    <script src="{{ path }}js/plugins/datatables/DT_bootstrap.js"></script>
	<script src="{{ path }}js/plugins/responsive-tables/responsive-tables.js"></script>
    
    

	
	<script src="{{ path }}js/plugins/excanvas/excanvas.min.js"></script>
{% endblock %}

{% block javascript %}
function OnSubmitForm(){
	if(document.pressed == 'Ingresar'){
		document.login.action ="/login/";
	}
    
    if(document.pressed == 'Recuperar'){
    	var confirmar = confirm("Se creará una nueva contraseña que se enviará a su correo electrónico. ¿Desea continuar?");
        if(confirmar){
        	document.login.action ="/recuperar_contrasena/";
        }
        else{
	        document.login.action ="/";
        }
	}

	return true;
}

{% endblock %}

{% block ruta %}
		
{% endblock %}

{% block contenido2 %}
<div class="span12">
	<div class="widget">
        <div class="widget-content">
        	<div class="video-index">
                <h1>Mitflow</h1>
                <p>El sitio web donde puedes realizar tus trámites electrónicos.</p>
                <iframe src="http://player.vimeo.com/video/39964956" width="500" height="375" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
                {% autoescape off %}
                    {{ saludo }}
                {% endautoescape %}
			</div>
            <div class="account-container login">
                <div class="content clearfix">
                    <form id="login" name="login" onSubmit="return OnSubmitForm();" method="post">
                        {% csrf_token %}
                        <div class="login-fields">
                            <h1>Iniciar Sesión</h1>			
                            <p>Iniciar sesión con su cuenta registrada:</p>
                            
                            <div class="field">
                                <label for="username">Usuario:</label>
                                <input type="text" id="usuario" name="usuario" value="" placeholder="Username" class="login username-field" />
                            </div> <!-- /field -->
                            
                            <div class="field">
                                <label for="password">Contraseña:</label>
                                <input type="password" id="contrasena" name="contrasena" value="" placeholder="Password" class="login password-field"/>
                            </div> <!-- /password -->
                            
                        </div> <!-- /login-fields -->
                        {% if msg_error %}
                            <div class="alert alert-error">
                                <h4 class="alert-heading">{{ msg_error }}</h4>
                            </div>
                        {% endif %}
                        <div class="login-actions">
                            <span class="login-checkbox">Recordar <a href="#mdl_recordar" data-toggle="modal" id="recordar">contraseña</a></span>
                            <button type="submit" class="button btn btn-secondary btn-large" id="ingresar" value="Ingresar" onclick="document.pressed=this.value">Ingresar</button>
                        </div> <!-- .actions -->
                    </form>
                </div>
			</div>
        </div>
    </div>
</div>
{% endblock %}